<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="bg" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>{{ title|default('Начало') }} - Административен панел</title>

        {% block css %}
            <link href="{{ asset("css/normalize.css") }}" rel="stylesheet" type="text/css" media="screen" />
            <link href="{{ asset("css/bootstrap.min.css") }}" rel="stylesheet" type="text/css" media="screen" />
            <link href="{{ asset("css/admin.css") }}" rel="stylesheet" type="text/css" media="screen" />
            <link href="{{ asset("css/ui-lightness/jquery-ui-1.10.4.custom.min.css") }}" rel="stylesheet" type="text/css" media="screen" />
        {% endblock css %}

        {% block js %}
            <script src="{{ asset("js/jquery-1.11.0.min.js") }}"></script>
            <script src="{{ asset("js/jquery-ui-1.10.4.custom.min.js") }}"></script>
            <script src="{{ asset("js/admin.js") }}"></script>
            <script src="{{ asset("js/bootstrap.min.js") }}"></script>
        {% endblock js %}
    </head>
    <body>
        <div class="container">
            <nav class="navbar navbar-default" role="navigation">
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                            Отвори меню
                        </button>
                        <a class="navbar-brand" href="{{ path('home') }}"><i class="glyphicon glyphicon-globe"></i></a>
                    </div>

                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li {% if app.route.name == 'admin_home' %}class="active"{% endif %}><a href="{{ path('admin_home') }}"><i class="glyphicon glyphicon-home">&nbsp;</i>Начало</a></li>
                            <li {% if app.route.name == 'admin_products' or app.route.name == 'admin_products_add' or app.route.name == 'admin_products_edit' %}class="active"{% endif %}><a href="{{ path('admin_products') }}"><i class="glyphicon glyphicon-list">&nbsp;</i>Продукти</a></li>
                                {#                            <li {% if app.route.name in { 1:'admin_categories', 2:'admin_categories_add', 3:'admin_categories_edit' } %}class="active"{% endif %}><a href="{{ path('admin_categories') }}"><i class="glyphicon glyphicon-list">&nbsp;</i>Категории</a></li>#}
                            <li {% if app.route.name == 'admin_pages' or app.route.name == 'admin_page_add' or app.route.name == 'admin_page_edit' %}class="active"{% endif %}><a href="{{ path('admin_pages') }}"><i class="glyphicon glyphicon-list-alt">&nbsp;</i>Страници</a></li>
                            <li {% if app.route.name == 'admin_tags' %}class="active"{% endif %}><a href="{{ path('admin_tags') }}"><i class="glyphicon glyphicon-tags">&nbsp;</i>Тагове</a></li>
                                {#                            <li {% if app.route.name in { 1:'admin_mails', 2:'admin_mails_details' } %}class="active"{% endif %}><a href="{{ path('admin_mails') }}"><i class="glyphicon glyphicon-envelope">&nbsp;</i>Запитвания</a></li>#}
                            <li><a href="{{ path('admin_logout') }}"><i class="glyphicon glyphicon-log-out">&nbsp;</i>Изход</a></li>
                            {% block menu %}{% endblock menu %}
                            <li style="border-left: 1px dashed silver; margin-left: 5px;"><a href="#"><b>Посетители: {{ guests }}</b></a></li>
                            <li style="border-left: 1px dashed silver; margin-left: 5px;"><a href="#"><b>Импресии: {{ impressions }}</b></a></li>
                        </ul>
                    </div><!-- /.navbar-collapse -->
                </div><!-- /.container-fluid -->
            </nav>

            <div class="container-fluid">
                {% block content %}
                {% endblock content %}
            </div>
        </div>
    </body>
</html>
